home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1603 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: rz.uni-passau.de!hatto!berndl
  2. From: berndl@hatto.uni-passau.de (Klaus Berndl)
  3. Newsgroups: comp.lang.c
  4. Subject: Server-Terminating from client
  5. Date: 15 Jan 1996 15:43:37 GMT
  6. Organization: University of Passau, Germany
  7. Sender: berndl@hatto (Klaus Berndl)
  8. Distribution: world
  9. Message-ID: <4ddsn9$s9e@news.rz.uni-passau.de>
  10. NNTP-Posting-Host: 132.231.1.74
  11. Keywords: Client-Server, RPC
  12.  
  13. There`s an ONC-RPC programming-Problem:
  14.  
  15. I have a RPC-procedure ('terminate_server_1()') on serverside to unregister und terminate the server by RPC-call from clientside.
  16.  
  17. void* terminate_server_1 () {
  18.  
  19.   svc_unreg(PROG_NUM, VERS_NUM);  /*unregister-call in TIRPC (Solaris 2.4) */
  20.   exit(0); (+++)
  21. }
  22.  
  23. On clientside:
  24.  
  25.   ...
  26.   terminate_server_1();
  27.   clnt_destroy(cl);
  28.   exit(0);
  29.  
  30.  
  31. My problem is now: The 'exit'-call (line +++) in the server-procedure 'terminate...' never returns, and therefore 'terminate_server_1' never returns and therefore client hangs after calling 'terminate...'! What must i do, so that server exits gracefully and nevertheless client doesn`t hang and gets a acknowledgement of correkt server-terminating!
  32.  
  33. Many thanks in advance!
  34.  
  35. Ciao,
  36.       KLaus 
  37.  
  38.  
  39.  
  40. _______________________________________________________________________________
  41.  
  42. Klaus Berndl                                   e-mail: berndl@fmi.uni-passau.de
  43. _______________________________________________________________________________
  44.